home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagn_r.zip
/
OOP.SWG
/
0006_NUMVIEW.PAS.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-05-28
|
948b
|
55 lines
Unit NumView;
Interface
Uses
Views, Objects, Drivers;
Type
PNumView = ^TNumView;
TNumView = Object(TView)
Number : LongInt;
Constructor init(Var Bounds: Trect);
Procedure update(num:LongInt);
Procedure draw; Virtual;
Destructor done; Virtual;
end;
Implementation
{---------------------------}
{ }
{ TNumView Methods }
{ }
{---------------------------}
Constructor TNumView.Init(Var Bounds: Trect);
begin
inherited init(Bounds);
end;
Procedure TNumView.Update(num:LongInt);
begin
Number := num; Draw;
end;
Procedure TNumView.Draw; Var
B: TDrawBuffer;
C: Word;
Display : String;
begin
C := GetColor(6);
MoveChar(B, ' ', C, Size.X);
Str(Number,Display);
MoveStr(B, Display,C);
WriteLine(0, 0, Size.X,Length(Display), B);
end;
Destructor TNumView.Done;
begin
inherited done;
end;
end.